import java.util.ArrayList;
import java.util.List;

/**
 * @author : cww
 * @date : 2021/1/23 22:37
 */
public class ObjectStructure {
    private List<Person> personList;
    public ObjectStructure(){
        personList = new ArrayList<>();
    }
    public void add(Person person){
        personList.add(person);
    }
    public void display(Visitor visitor){
        personList.forEach(t->{
            t.accept(visitor);
        });
    }
}
